var express = require('express');

var router = require('./router/router');

var kydb = require('./models/kydb');



//const hostname = '127.0.0.1';
//const port = 8081;

// https://gitee.com/yu-vin/cellboxer.git
const hostname = '172.18.115.138';
const port = 3000;


//server
var app = express();

//temp engine
app.set('view engine','ejs');

//static file
app.use(express.static('./public'));

//router table
app.get('/',router.showIndex);

app.get('/regist',router.showRegist);

app.post('/doRegist',router.doRegist);


// begin listen
app.listen(port, hostname, () => {
    console.log(`Server running at http://${hostname}:${port}/`);
});

